#!/usr/bin/env python
#_* coding:UTF-8 _*_

import threading, time

a = 50
b = 50
c = 50
d = 50

def printvar():
    print "a = ", a
    print "b = ", b
    print "c = ", c
    print "d = ", d

def threadcode():
    global a, b, c, d

    a += 50
    b = b+50
    c = 100
    d = "Hello"

    print "[ChildThread] Values of variables in child thread:"
    printvar()


print "[MainThread] values of variables defore child thread:"
printvar()

t = threading.Thread(target=threadcode, name="ChildTread")
t.setDaemon(1)
t.start()

t.join()

print "[MainThread] values of variables defore child thread:"
printvar()
